<template>
<tbody>
	<tr v-for="data in datas">
		<td style='text-align: center'><b
			style='color: #46adaa; cursor: pointer;' v-on:click='on_show_panel()'>
				{{data.key}} </b></td>
		<td
			style='text-align: center; word-break: break-all; word-wrap: break-all;'>
			{{data.name}}</td>
		<td style='text-align: center'>{{data.tag}}</td>
		<td style='text-align: center'>
			<p v-if="data.submit">是</p>
			<p v-else>否</p>
		</td>
		<td style='text-align: center'>
			<p v-if="data.leaf">是</p>
			<p v-else>否</p>
		</td>
		<td style='text-align: center'>
			<p v-if="data.show">是</p>
			<p v-else>否</p>
		</td>
		<td style='text-align: center'><b
			style='color: #1592ff; cursor: pointer;' @click='on_modify(data.key)'>修改</b>
			<b style='color: #1592ff;'>|</b> <b
			style='color: #1592ff; cursor: pointer;'
			v-on:click='on_delete(data.key)'>删除</b></td>
	</tr>
</tbody>
</template>
<script>

<script>
    function TreeNode() {
        this.key = "";
        this.name = "";
        this.tag = "";
        this.submit = false;
        this.leaf = false;
        this.show = false;
    }
	export default {
		name: 'node-table-row',
		props: {datas:Array},
	    methods:{
	        on_show_panel: function(val){alert("show " + val);},
	        on_modify: function(val){alert("modify " + val);},
	        on_delete: function(val){alert("delete " + val);}
	    }
	}
</script>